home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_sea_cargo_encounter1.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
5KB
|
162 lines
# Jones 3D Cog Script
#
# SEA_Cargo_Encounter1.cog
#
# Sets up a one time scripted encounter with some commies soon after Volodnikov is alerted to Indy's escape
#
#
# [JM]
#
# (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ========================================================================================
symbols
message startup
message entered
message killed
# ==================== SUBROUTINES ===================
flex attack local
# =================== REFERENCES ===============================
thing Commie00 LinkID=1
thing Commie01 LinkID=1
thing Commie02 LinkID=1
surface SurfaceTrigger00 LinkID=2
surface AIActivate00 LinkID=3
surface AIActivate01 LinkID=3
surface AIActivate02 LinkID=3
surface AIDeActivate00 LinkID=4
surface AIDeActivate01 LinkID=4
surface AIDeActivate02 LinkID=4
thing SoundGhost00
# ===================== MISC LOCAL VARIABLES ===================
int counter local
int StartCheck=0 local
thing TempCommie local
# =========================== SOUNDS ============================
sound DoorSound=sea_doors_open_c.wav local
sound Chatter00=inxh3016.wav local
# ==================== CONSTANTS ==========================
int NUMBER_OF_COMMIES=3 local
int NUMBER_OF_DOORS=2 local #So that I can make it sound like two doors are opening, for dramatic effect
flex ATTACK_DELAY=0.5 local #Needed for timing if music is inserted at a later date
flex COMMIE_ACTIVATE_DELAY=0.5 local
end
# ======================= CODE =============================
code
# =========================================================
startup:
for(counter = 0; counter < NUMBER_OF_COMMIES; counter = counter + 1)
{
SetThingFlags(Commie00[counter], 0x80000);
}
return;
# =========================================================
entered:
if(GetSenderID() == 2)
{
if(StartCheck == 1) return;
StartCheck = 1;
Call attack;
}
return;
# =========================================================
crossed:
if(GetSenderID() == 3)
{
for(counter = 0; counter < NUMBER_OF_COMMIES; counter = counter + 1)
{
if(Commie00[counter] != -1)
AISetInstinctWpntMode(Commie00[counter]);
AIEnableInstinct(Commie00[counter], "roam", 1);
}
}
else if(GetSenderID() == 4)
{
for(counter = 0; counter < NUMBER_OF_COMMIES; counter = counter + 1)
{
if(Commie00[counter] != -1)
AIClearInstinctWpntMode(Commie00[counter]);
AIEnableInstinct(Commie00[counter], "roam", 0);
}
}
return;
# =========================================================
killed:
if(GetSenderID() == 1)
{
TempCommie = GetSenderRef();
for(counter = 0; counter < NUMBER_OF_COMMIES; counter = counter + 1)
{
if(Commie00[counter] == TempCommie)
{
Commie00[counter] = -1;
}
}
}
return;
# =========================================================
//The initial script for the three Commies Jumping Indy after his whip swing
attack:
sleep(ATTACK_DELAY);
PlaySoundThing(DoorSound, SoundGhost00, 1.0, 5, 14, 0);
sleep(COMMIE_ACTIVATE_DELAY);
PlaySoundThing(Chatter00, SoundGhost00, 1.0, 2, 14, 0);
for(counter = 0; counter < NUMBER_OF_COMMIES; counter = counter + 1)
{
ClearThingFlags(Commie00[counter], 0x80000);
AISetInstinctWpntMode(Commie00[counter]);
AIEnableInstinct(Commie00[counter], "roam", 1);
if(counter > 0)
{
AIWpntHuntTarget(Commie00[counter], 1.6, 0.0); # Two of the Commies hunt Indy Immediately while the first one (officer?) stays put
}
sleep(COMMIE_ACTIVATE_DELAY);
}
return;
# ============================================================
end